/**
 * 公共组件模块 - type
 */

import { MenuProps } from "antd";
import { Dayjs } from "dayjs";

// 菜单类型
export interface Ixuanhuan {
    label: string;
    key: string;
    icon?: React.ReactNode;
    children?: Ixuanhuan[];
    type?: "group";
    disabled?: boolean;
}
// 处理之后的菜单类型
export interface IMenuTree {
    url: string; //  跳转地址
    icon: string; // 菜单icon
    menuType: string; //	菜单类型（M目录 C菜单 F按钮）
    menuName: string; // 菜单名称
    perms: string; //权限
    children: IMenuTree[];
}

export type MenuItem = Required<MenuProps>['items'][number];

//分页
export type TablePaginationPosition =
  | "topLeft"
  | "topCenter"
  | "topRight"
  | "bottomLeft"
  | "bottomCenter"
  | "bottomRight";

// 日期需要用到的类型
export type RangeValue = [Dayjs | null, Dayjs | null] | null;

//选择器
export type ISelectList = {
  label: string;
  value: string;
  disabled?: boolean;
};
// 树形选择器
export type ITreeSelectList = {
  label: string;
  value: string;
  disabled?: boolean;
  children: ITreeSelectList[];
};